import request from '@/utils/request'

// 查询设备点检保养计划跟踪列表
export function listTrack(query) {
  return request({
    url: '/mes/dv/checkplantrack/list',
    method: 'get',
    params: query
  })
}

// 查询设备点检保养计划跟踪详细
export function getTrack(id) {
  return request({
    url: '/mes/dv/checkplantrack/' + id,
    method: 'get'
  })
}

// 新增设备点检保养计划跟踪
export function addTrack(data) {
  return request({
    url: '/mes/dv/checkplantrack',
    method: 'post',
    data: data
  })
}

// 修改设备点检保养计划跟踪
export function updateTrack(data) {
  return request({
    url: '/mes/dv/checkplantrack',
    method: 'put',
    data: data
  })
}

// 删除设备点检保养计划跟踪
export function delTrack(id) {
  return request({
    url: '/mes/dv/checkplantrack/' + id,
    method: 'delete'
  })
}

export function handleTrack(data) {
  return request({
    url: '/mes/dv/checkplantrack/handleTrack',
    method: 'post',
    data: data
  })
}

export function getTrackByMachineryId(query) {
  return request({
    url: '/mes/dv/checkplantrack/byMachineryId',
    method: 'get',
    params: query
  })
}

export function selectFileManageList(data) {
  return request({
    url: '/mes/file/selectFileManageList',
    method: 'post',
    data: data
  })
}
